package service;

import dao.UserCenterDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pojo.Cart;
import pojo.Orderlist;
import pojo.User;

import java.util.List;

@Service("userCenterService")
@Transactional
public class UserCenterService {
    @Autowired
    private UserCenterDao userCenterDao;
    public int uU(User user){return userCenterDao.updateUser(user);}
    public List<Orderlist> sMOL(Integer uid){return userCenterDao.selectMyOrderList(uid);}
    public List<Cart> sMC(Integer uid){return userCenterDao.selectMyCart(uid);}
    public List<User> sU(Integer uid){return userCenterDao.selectUserByUid(uid);}
}
